/*
 * @Author: your name
 * @Date: 2021-01-25 20:25:44
 * @LastEditTime: 2021-01-25 23:59:30
 * @LastEditors: Please set LastEditors
 * @Description: 页面内容
 * @FilePath: \ad-api\routes\admin\pageContent.js
 */
const express = require('express');
const router = express.Router();
const Result = require('../../models/result.js');
const { getContentService  } = require('../../service/contentService')

 //获取页面内容
router.post('/page_content', async (req, res, next)=>{
           const { page_id } = req.body
           const {results ,status} = await getContentService(page_id)
           if(status){
            new Result(results , "查询成功").success(res)
           }else{
            new Result({},'服务器错误,查询失败').fail(res) 
           }
}) 

module.exports = router;